package com.qiaoba.module.system.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qiaoba.common.database.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 角色
 *
 * @author ailanyin
 * @date 2023-09-10 13:43:02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_role")
public class SysRole extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId
    @Excel(name = "角色ID", width = 20)
    @Schema(description = "角色ID")
    private String roleId;

    @Excel(name = "角色名称", width = 20)
    @Schema(description = "角色名称")
    private String roleName;

    @Excel(name = "权限字符", width = 20)
    @Schema(description = "权限字符")
    private String roleKey;

    @Excel(name = "角色排序", width = 20)
    @Schema(description = "角色排序")
    private Integer roleSort;

    @Excel(name = "数据范围", width = 20, replace = {"所有数据权限_1", "自定义数据权限_2", "本部门数据权限_3", "本部门及以下数据权限_4", "仅本人数据权限_5"})
    @Schema(description = "数据范围（1：所有数据权限；2：自定义数据权限；3：本部门数据权限；4：本部门及以下数据权限；5：仅本人数据权限）")
    private String dataScope;

    @Schema(description = "菜单树选择项是否关联显示（ 0：父子不互相关联显示 1：父子互相关联显示）")
    private boolean menuCheckStrictly;

    @Schema(description = "部门树选择项是否关联显示（0：父子不互相关联显示 1：父子互相关联显示 ）")
    private boolean deptCheckStrictly;

    @Excel(name = "状态", width = 20, replace = {"正常_1", "禁用_0"})
    @Schema(description = "状态 1正常0禁用")
    private String status;

}
